package org.vehicle.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.vehicle.dao.BlacklistMapper;
import org.vehicle.entity.Blacklist;
import org.vehicle.service.BlacklistService;
import org.vehicle.service.base.BaseServiceImpl;
@Service
public class BlacklistServiceImpl extends BaseServiceImpl<Blacklist, Long> implements BlacklistService{
	@Autowired
	private BlacklistMapper blacklistMapper;
	
	@Override
	public Map<String, Object> getBlacklistPage(Map<String, Object> paramMap) {
		List<Blacklist> blacklistList = blacklistMapper.getBlacklistList(paramMap);
    	Integer count = blacklistMapper.getBlacklistCount(paramMap);
    	//分页数据
    	Map<String, Object> dataMap = new HashMap<String, Object>();
    	dataMap.put("totalCount", count);
    	dataMap.put("list", blacklistList);
    	dataMap.put("currentPage", paramMap.get("currentPage"));
		return dataMap;
	}

	@Override
	public Blacklist findBlacklistByCertificateCode(Map<String, Object> paramMap) {
		
		return blacklistMapper.findBlacklistByCertificateCode(paramMap);
	}
	
}